<!DOCTYPE HTML>
<html lang="en" >
    
    <head>
        
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>性能 | Redux 中文文档 Join the chat at https://gitter.im/camsong/redux-in-chinese</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.3.3">
        
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-edit-link/plugin.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-prism/prism.css">
        
    
    

        
    
    
    <link rel="next" href="../../docs/faq/ReactRedux.html" />
    
    
    <link rel="prev" href="../../docs/faq/CodeStructure.html" />
    

        
    </head>
    <body>
        
        
    <div class="book" data-level="5.7" data-basepath="../.." data-revision="Thu Mar 16 2017 23:41:56 GMT+0800 (CST)">
    

<div class="book-summary">
    <div class="book-search">
        <input type="text" placeholder="Type to search" class="form-control" />
    </div>
    <ul class="summary">
        
        
        
        

        

        
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        自述
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1" data-path="docs/introduction/index.html">
            
                
                    <a href="../../docs/introduction/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        介绍
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="docs/introduction/Motivation.html">
            
                
                    <a href="../../docs/introduction/Motivation.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        动机
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="docs/introduction/CoreConcepts.html">
            
                
                    <a href="../../docs/introduction/CoreConcepts.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        核心概念
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="docs/introduction/ThreePrinciples.html">
            
                
                    <a href="../../docs/introduction/ThreePrinciples.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        三大原则
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="docs/introduction/PriorArt.html">
            
                
                    <a href="../../docs/introduction/PriorArt.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.4.</b>
                        
                        先前技术
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="docs/introduction/Ecosystem.html">
            
                
                    <a href="../../docs/introduction/Ecosystem.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.5.</b>
                        
                        生态系统
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="docs/introduction/Examples.html">
            
                
                    <a href="../../docs/introduction/Examples.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.6.</b>
                        
                        示例
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="docs/basics/index.html">
            
                
                    <a href="../../docs/basics/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        基础
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="docs/basics/Actions.html">
            
                
                    <a href="../../docs/basics/Actions.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        Action
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="docs/basics/Reducers.html">
            
                
                    <a href="../../docs/basics/Reducers.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        Reducer
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="docs/basics/Store.html">
            
                
                    <a href="../../docs/basics/Store.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        Store
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="docs/basics/DataFlow.html">
            
                
                    <a href="../../docs/basics/DataFlow.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        数据流
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.5" data-path="docs/basics/UsageWithReact.html">
            
                
                    <a href="../../docs/basics/UsageWithReact.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.5.</b>
                        
                        搭配 React
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.6" data-path="docs/basics/ExampleTodoList.html">
            
                
                    <a href="../../docs/basics/ExampleTodoList.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.6.</b>
                        
                        示例：Todo List
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="docs/advanced/index.html">
            
                
                    <a href="../../docs/advanced/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        高级
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="docs/advanced/AsyncActions.html">
            
                
                    <a href="../../docs/advanced/AsyncActions.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        异步 Action
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="docs/advanced/AsyncFlow.html">
            
                
                    <a href="../../docs/advanced/AsyncFlow.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        异步数据流
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="docs/advanced/Middleware.html">
            
                
                    <a href="../../docs/advanced/Middleware.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        Middleware
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="docs/advanced/UsageWithReactRouter.html">
            
                
                    <a href="../../docs/advanced/UsageWithReactRouter.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.4.</b>
                        
                        搭配 React Router
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="docs/advanced/ExampleRedditAPI.html">
            
                
                    <a href="../../docs/advanced/ExampleRedditAPI.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.5.</b>
                        
                        示例：Reddit API
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.6" data-path="docs/advanced/NextSteps.html">
            
                
                    <a href="../../docs/advanced/NextSteps.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.6.</b>
                        
                        下一步
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="docs/recipes/index.html">
            
                
                    <a href="../../docs/recipes/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        技巧
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="docs/recipes/MigratingToRedux.html">
            
                
                    <a href="../../docs/recipes/MigratingToRedux.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        迁移到 Redux
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="docs/recipes/UsingObjectSpreadOperator.html">
            
                
                    <a href="../../docs/recipes/UsingObjectSpreadOperator.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        使用对象展开运算符
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="docs/recipes/ReducingBoilerplate.html">
            
                
                    <a href="../../docs/recipes/ReducingBoilerplate.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.3.</b>
                        
                        减少样板代码
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.4" data-path="docs/recipes/ServerRendering.html">
            
                
                    <a href="../../docs/recipes/ServerRendering.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.4.</b>
                        
                        服务端渲染
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.5" data-path="docs/recipes/WritingTests.html">
            
                
                    <a href="../../docs/recipes/WritingTests.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.5.</b>
                        
                        编写测试
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.6" data-path="docs/recipes/ComputingDerivedData.html">
            
                
                    <a href="../../docs/recipes/ComputingDerivedData.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.6.</b>
                        
                        计算衍生数据
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.7" data-path="docs/recipes/ImplementingUndoHistory.html">
            
                
                    <a href="../../docs/recipes/ImplementingUndoHistory.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.7.</b>
                        
                        实现撤销重做
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.8" data-path="docs/recipes/IsolatingSubapps.html">
            
                
                    <a href="../../docs/recipes/IsolatingSubapps.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.8.</b>
                        
                        子应用隔离
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.9" data-path="docs/recipes/StructuringReducers.html">
            
                
                    <a href="../../docs/recipes/StructuringReducers.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.9.</b>
                        
                        组织 Reducer
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.9.1" data-path="docs/recipes/reducers/PrerequisiteConcepts.html">
            
                
                    <a href="../../docs/recipes/reducers/PrerequisiteConcepts.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.9.1.</b>
                        
                        Reducer 基础概念
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.9.2" data-path="docs/recipes/reducers/BasicReducerStructure.html">
            
                
                    <a href="../../docs/recipes/reducers/BasicReducerStructure.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.9.2.</b>
                        
                        Reducer 基础结构
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.9.3" data-path="docs/recipes/reducers/SplittingReducerLogic.html">
            
                
                    <a href="../../docs/recipes/reducers/SplittingReducerLogic.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.9.3.</b>
                        
                        Reducer 逻辑拆分
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.9.4" data-path="docs/recipes/reducers/RefactoringReducersExample.html">
            
                
                    <a href="../../docs/recipes/reducers/RefactoringReducersExample.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.9.4.</b>
                        
                        Reducer 重构示例
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.9.5" data-path="docs/recipes/reducers/UsingCombineReducers.html">
            
                
                    <a href="../../docs/recipes/reducers/UsingCombineReducers.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.9.5.</b>
                        
                        `combineReducers` 用法
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.9.6" data-path="docs/recipes/reducers/BeyondCombineReducers.html">
            
                
                    <a href="../../docs/recipes/reducers/BeyondCombineReducers.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.9.6.</b>
                        
                        `combineReducers` 进阶
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.9.7" data-path="docs/recipes/reducers/NormalizingStateShape.html">
            
                
                    <a href="../../docs/recipes/reducers/NormalizingStateShape.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.9.7.</b>
                        
                        State 范式化
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.9.8" data-path="docs/recipes/reducers/UpdatingNormalizedData.html">
            
                
                    <a href="../../docs/recipes/reducers/UpdatingNormalizedData.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.9.8.</b>
                        
                        管理范式化数据
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.9.9" data-path="docs/recipes/reducers/ReusingReducerLogic.html">
            
                
                    <a href="../../docs/recipes/reducers/ReusingReducerLogic.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.9.9.</b>
                        
                        Reducer 逻辑复用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.9.10" data-path="docs/recipes/reducers/ImmutableUpdatePatterns.html">
            
                
                    <a href="../../docs/recipes/reducers/ImmutableUpdatePatterns.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.9.10.</b>
                        
                        不可变更新模式
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.9.11" data-path="docs/recipes/reducers/InitializingState.html">
            
                
                    <a href="../../docs/recipes/reducers/InitializingState.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.9.11.</b>
                        
                        初始化 State
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5" data-path="docs/FAQ.html">
            
                
                    <a href="../../docs/FAQ.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        常见问题
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1" data-path="docs/faq/General.html">
            
                
                    <a href="../../docs/faq/General.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.1.</b>
                        
                        综合
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="docs/faq/Reducers.html">
            
                
                    <a href="../../docs/faq/Reducers.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.</b>
                        
                        Reducer
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.3" data-path="docs/faq/OrganizingState.html">
            
                
                    <a href="../../docs/faq/OrganizingState.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.3.</b>
                        
                        组织 State
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.4" data-path="docs/faq/StoreSetup.html">
            
                
                    <a href="../../docs/faq/StoreSetup.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.4.</b>
                        
                        创建 Store
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.5" data-path="docs/faq/Actions.html">
            
                
                    <a href="../../docs/faq/Actions.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.5.</b>
                        
                        Action
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.6" data-path="docs/faq/CodeStructure.html">
            
                
                    <a href="../../docs/faq/CodeStructure.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.6.</b>
                        
                        代码结构
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="5.7" data-path="docs/faq/Performance.html">
            
                
                    <a href="../../docs/faq/Performance.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.7.</b>
                        
                        性能
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.8" data-path="docs/faq/ReactRedux.html">
            
                
                    <a href="../../docs/faq/ReactRedux.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.8.</b>
                        
                        React Redux
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.9" data-path="docs/faq/Miscellaneous.html">
            
                
                    <a href="../../docs/faq/Miscellaneous.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.9.</b>
                        
                        其它
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="6" data-path="docs/Troubleshooting.html">
            
                
                    <a href="../../docs/Troubleshooting.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>6.</b>
                        
                        排错
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="7" data-path="docs/Glossary.html">
            
                
                    <a href="../../docs/Glossary.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>7.</b>
                        
                        词汇表
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8" data-path="docs/api/index.html">
            
                
                    <a href="../../docs/api/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.</b>
                        
                        API 文档
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="8.1" data-path="docs/api/createStore.html">
            
                
                    <a href="../../docs/api/createStore.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.1.</b>
                        
                        createStore
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8.2" data-path="docs/api/Store.html">
            
                
                    <a href="../../docs/api/Store.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.2.</b>
                        
                        Store
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8.3" data-path="docs/api/combineReducers.html">
            
                
                    <a href="../../docs/api/combineReducers.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.3.</b>
                        
                        combineReducers
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8.4" data-path="docs/api/applyMiddleware.html">
            
                
                    <a href="../../docs/api/applyMiddleware.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.4.</b>
                        
                        applyMiddleware
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8.5" data-path="docs/api/bindActionCreators.html">
            
                
                    <a href="../../docs/api/bindActionCreators.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.5.</b>
                        
                        bindActionCreators
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="8.6" data-path="docs/api/compose.html">
            
                
                    <a href="../../docs/api/compose.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>8.6.</b>
                        
                        compose
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="9" data-path="docs/react-redux/index.html">
            
                
                    <a href="../../docs/react-redux/index.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.</b>
                        
                        react-redux 文档
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="9.1" data-path="docs/react-redux/api.html">
            
                
                    <a href="../../docs/react-redux/api.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.1.</b>
                        
                        API
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="9.2" data-path="docs/react-redux/troubleshooting.html">
            
                
                    <a href="../../docs/react-redux/troubleshooting.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>9.2.</b>
                        
                        排错
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="10" >
            
                
                    <a target="_blank" href="https:/github.com/react-guide/redux-tutorial-cn">
                
                        <i class="fa fa-check"></i>
                        
                            <b>10.</b>
                        
                        redux-tutorial
                    </a>
            
            
        </li>
    


        
        <li class="divider"></li>
        <li>
            <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                Published with GitBook
            </a>
        </li>
        
    </ul>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header">
    <!-- Actions Left -->
    <a href="#" class="btn pull-left toggle-summary" aria-label="Table of Contents"><i class="fa fa-align-justify"></i></a>
    <a href="#" class="btn pull-left toggle-search" aria-label="Search"><i class="fa fa-search"></i></a>
    
    <div id="font-settings-wrapper" class="dropdown pull-left">
        <a href="#" class="btn toggle-dropdown" aria-label="Font Settings"><i class="fa fa-font"></i>
        </a>
        <div class="dropdown-menu font-settings">
    <div class="dropdown-caret">
        <span class="caret-outer"></span>
        <span class="caret-inner"></span>
    </div>

    <div class="buttons">
        <button type="button" id="reduce-font-size" class="button size-2">A</button>
        <button type="button" id="enlarge-font-size" class="button size-2">A</button>
    </div>

    <div class="buttons font-family-list">
        <button type="button" data-font="0" class="button">Serif</button>
        <button type="button" data-font="1" class="button">Sans</button>
    </div>

    <div class="buttons color-theme-list">
        <button type="button" id="color-theme-preview-0" class="button size-3" data-theme="0">White</button>
        <button type="button" id="color-theme-preview-1" class="button size-3" data-theme="1">Sepia</button>
        <button type="button" id="color-theme-preview-2" class="button size-3" data-theme="2">Night</button>
    </div>
</div>

    </div>

    <!-- Actions Right -->
    
    <div class="dropdown pull-right">
        <a href="#" class="btn toggle-dropdown" aria-label="Share"><i class="fa fa-share-alt"></i>
        </a>
        <div class="dropdown-menu font-settings dropdown-left">
            <div class="dropdown-caret">
                <span class="caret-outer"></span>
                <span class="caret-inner"></span>
            </div>
            <div class="buttons">
                <button type="button" data-sharing="twitter" class="button">
                    Share on Twitter
                </button>
                <button type="button" data-sharing="google-plus" class="button">
                    Share on Google
                </button>
                <button type="button" data-sharing="facebook" class="button">
                    Share on Facebook
                </button>
                <button type="button" data-sharing="weibo" class="button">
                    Share on Weibo
                </button>
                <button type="button" data-sharing="instapaper" class="button">
                    Share on Instapaper
                </button>
            </div>
        </div>
    </div>
    

    
    <a href="#" target="_blank" class="btn pull-right google-plus-sharing-link sharing-link" data-sharing="google-plus" aria-label="Google"><i class="fa fa-google-plus"></i></a>
    
    
    <a href="#" target="_blank" class="btn pull-right facebook-sharing-link sharing-link" data-sharing="facebook" aria-label="Facebook"><i class="fa fa-facebook"></i></a>
    
    
    <a href="#" target="_blank" class="btn pull-right twitter-sharing-link sharing-link" data-sharing="twitter" aria-label="Twitter"><i class="fa fa-twitter"></i></a>
    
    
    


    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../" >Redux 中文文档 Join the chat at https://gitter.im/camsong/redux-in-chinese</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <a id="edit-link" href="https://github.com/camsong/redux-in-chinese/tree/master/docs/faq/Performance.md" class="btn fa fa-edit pull-left">&#xA0;&#xA0;&#x5F00;&#x59CB;&#x7EA0;&#x9519;</a><h1 id="redux-%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98%EF%BC%9A%E6%80%A7%E8%83%BD">Redux &#x5E38;&#x89C1;&#x95EE;&#x9898;&#xFF1A;&#x6027;&#x80FD;</h1>
<h2 id="%E7%9B%AE%E5%BD%95">&#x76EE;&#x5F55;</h2>
<ul>
<li><a href="#performance-scaling">&#x8003;&#x8651;&#x5230;&#x6027;&#x80FD;&#x548C;&#x67B6;&#x6784;&#xFF0C; Redux &#x201C;&#x53EF;&#x6269;&#x5C55;&#x6027;&#x201D; &#x5982;&#x4F55;&#xFF1F;</a></li>
<li><a href="#performance-all-reducers">&#x6BCF;&#x4E2A; action &#x90FD;&#x8C03;&#x7528; &#x201C;&#x6240;&#x6709;&#x7684; reducer&#x201D; &#x4F1A;&#x4E0D;&#x4F1A;&#x5F88;&#x6162;&#xFF1F;</a></li>
<li><a href="#performance-clone-state">&#x5728; reducer &#x4E2D;&#x5FC5;&#x987B;&#x5BF9; state &#x8FDB;&#x884C;&#x6DF1;&#x62F7;&#x8D1D;&#x5417;&#xFF1F;&#x62F7;&#x8D1D; state &#x4E0D;&#x4F1A;&#x5F88;&#x6162;&#x5417;&#xFF1F;</a></li>
<li><a href="#performance-update-events">&#x600E;&#x6837;&#x51CF;&#x5C11; store &#x66F4;&#x65B0;&#x4E8B;&#x4EF6;&#x7684;&#x6570;&#x91CF;&#xFF1F;</a></li>
<li><a href="#performance-state-memory">&#x4EC5;&#x6709; &#x201C;&#x4E00;&#x4E2A; state &#x6811;&#x201D; &#x4F1A;&#x5F15;&#x53D1;&#x5185;&#x5B58;&#x95EE;&#x9898;&#x5417;&#xFF1F;&#x5206;&#x53D1;&#x591A;&#x4E2A; action &#x4F1A;&#x5360;&#x7528;&#x5185;&#x5B58;&#x7A7A;&#x95F4;&#x5417;&#xFF1F;</a></li>
</ul>
<h2 id="%E6%80%A7%E8%83%BD">&#x6027;&#x80FD;</h2>
<p><a id="performance-scaling"></a></p>
<h3 id="%E8%80%83%E8%99%91%E5%88%B0%E6%80%A7%E8%83%BD%E5%92%8C%E6%9E%B6%E6%9E%84%EF%BC%8C-redux-%E2%80%9C%E5%8F%AF%E6%89%A9%E5%B1%95%E6%80%A7%E2%80%9D-%E5%A6%82%E4%BD%95%EF%BC%9F">&#x8003;&#x8651;&#x5230;&#x6027;&#x80FD;&#x548C;&#x67B6;&#x6784;&#xFF0C; Redux &#x201C;&#x53EF;&#x6269;&#x5C55;&#x6027;&#x201D; &#x5982;&#x4F55;&#xFF1F;</h3>
<p>&#x6CA1;&#x6709;&#x4E00;&#x4E2A;&#x660E;&#x786E;&#x7684;&#x7B54;&#x6848;&#xFF0C;&#x5728;&#x5927;&#x591A;&#x6570;&#x60C5;&#x51B5;&#x4E0B;&#x90FD;&#x4E0D;&#x9700;&#x8981;&#x8003;&#x8651;&#x8BE5;&#x95EE;&#x9898;&#x3002;</p>
<p>Redux &#x6240;&#x505A;&#x7684;&#x5DE5;&#x4F5C;&#x53EF;&#x4EE5;&#x5206;&#x4E3A;&#x4EE5;&#x4E0B;&#x51E0;&#x90E8;&#x5206;&#xFF1A;&#x5728; middleware &#x548C; reducer &#x4E2D;&#x5904;&#x7406; action &#xFF08;&#x5305;&#x62EC;&#x5BF9;&#x8C61;&#x590D;&#x5236;&#x53CA;&#x4E0D;&#x53EF;&#x53D8;&#x66F4;&#x65B0;&#xFF09;&#x3001; action &#x5206;&#x53D1;&#x4E4B;&#x540E;&#x901A;&#x77E5;&#x8BA2;&#x9605;&#x8005;&#x3001;&#x6839;&#x636E; state &#x53D8;&#x5316;&#x66F4;&#x65B0; UI &#x7EC4;&#x4EF6;&#x3002;&#x867D;&#x7136;&#x5728;&#x4E00;&#x4E9B;&#x590D;&#x6742;&#x573A;&#x666F;&#x4E0B;&#xFF0C;&#x8FD9;&#x4E9B;&#x90FD; <em>&#x53EF;&#x80FD;</em> &#x53D8;&#x6210;&#x4E00;&#x4E2A;&#x6027;&#x80FD;&#x95EE;&#x9898;&#xFF0C;&#x4F46; Redux &#x672C;&#x8D28;&#x4E0A;&#x5E76;&#x6CA1;&#x6709;&#x4EFB;&#x4F55;&#x6162;&#x6216;&#x8005;&#x4F4E;&#x6548;&#x7684;&#x5B9E;&#x73B0;&#x3002;&#x5B9E;&#x9645;&#x4E0A;&#xFF0C;React Redux &#x5DF2;&#x7ECF;&#x505A;&#x4E86;&#x5927;&#x91CF;&#x7684;&#x4F18;&#x5316;&#x5DE5;&#x4F5C;&#x51CF;&#x5C11;&#x4E0D;&#x5FC5;&#x8981;&#x7684;&#x91CD;&#x590D;&#x6E32;&#x67D3;&#xFF0C;React Redux v5 &#x76F8;&#x6BD4;&#x4E4B;&#x524D;&#x7684;&#x7248;&#x672C;&#x6709;&#x7740;&#x663E;&#x8457;&#x7684;&#x6539;&#x8FDB;&#x3002;</p>
<p>&#x4E0E;&#x5176;&#x4ED6;&#x5E93;&#x76F8;&#x6BD4;&#xFF0C;Redux &#x53EF;&#x80FD;&#x6CA1;&#x6709;&#x90A3;&#x4E48;&#x5FEB;&#x3002;&#x4E3A;&#x4E86;&#x66F4;&#x5927;&#x9650;&#x5EA6;&#x7684;&#x5C55;&#x793A; React &#x7684;&#x6E32;&#x67D3;&#x6027;&#x80FD;&#xFF0C;state &#x5E94;&#x8BE5;&#x4EE5;&#x89C4;&#x8303;&#x5316;&#x7684;&#x7ED3;&#x6784;&#x5B58;&#x50A8;&#xFF0C;&#x8BB8;&#x591A;&#x5355;&#x72EC;&#x7684;&#x7EC4;&#x4EF6;&#x5E94;&#x8BE5;&#x76F4;&#x63A5;&#x8FDE;&#x63A5;&#x5230; store&#xFF0C;&#x8FDE;&#x63A5;&#x7684;&#x5217;&#x8868;&#x7EC4;&#x4EF6;&#x5E94;&#x8BE5;&#x5C06;&#x9879;&#x76EE; ID &#x4F20;&#x7ED9;&#x5B50;&#x5217;&#x8868;&#xFF08;&#x5141;&#x8BB8;&#x5217;&#x8868;&#x9879;&#x901A;&#x8FC7; ID &#x67E5;&#x627E;&#x6570;&#x636E;&#xFF09;&#x3002;&#x8FD9;&#x4F7F;&#x5F97;&#x8981;&#x8FDB;&#x884C;&#x6E32;&#x67D3;&#x7684;&#x91CF;&#x6700;&#x5C0F;&#x5316;&#x3002;&#x4F7F;&#x7528;&#x5E26;&#x6709;&#x8BB0;&#x5FC6;&#x529F;&#x80FD;&#x7684; selector &#x51FD;&#x6570;&#x4E5F;&#x5BF9;&#x6027;&#x80FD;&#x6709;&#x975E;&#x5E38;&#x5927;&#x7684;&#x5E2E;&#x52A9;&#x3002;</p>
<p>&#x8003;&#x8651;&#x5230;&#x67B6;&#x6784;&#x65B9;&#x9762;&#xFF0C;&#x4E8B;&#x5B9E;&#x8BC1;&#x636E;&#x8868;&#x660E;&#x5728;&#x5404;&#x79CD;&#x9879;&#x76EE;&#x53CA;&#x56E2;&#x961F;&#x89C4;&#x6A21;&#x4E0B;&#xFF0C;Redux &#x90FD;&#x8868;&#x73B0;&#x51FA;&#x8272;&#x3002;Redux &#x76EE;&#x524D;&#x6B63;&#x88AB;&#x6210;&#x767E;&#x4E0A;&#x5343;&#x7684;&#x516C;&#x53F8;&#x4EE5;&#x53CA;&#x66F4;&#x591A;&#x7684;&#x5F00;&#x53D1;&#x8005;&#x4F7F;&#x7528;&#x7740;&#xFF0C;NPM &#x4E0A;&#x6BCF;&#x6708;&#x90FD;&#x6709;&#x51E0;&#x5341;&#x4E07;&#x7684;&#x5B89;&#x88C5;&#x91CF;&#x3002;&#x6709;&#x4E00;&#x4F4D;&#x5F00;&#x53D1;&#x8005;&#x8FD9;&#x6837;&#x8BF4;&#xFF1A;</p>
<blockquote>
<p>&#x89C4;&#x6A21;&#x65B9;&#x9762;&#xFF0C;&#x6211;&#x4EEC;&#x5927;&#x7EA6;&#x6709;500&#x4E2A; action &#x7C7B;&#x578B;&#x3001;400&#x4E2A; reducer&#x3001;150&#x4E2A;&#x7EC4;&#x4EF6;&#x3001;5&#x4E2A; middleware&#x3001;200&#x4E2A; action&#x3001;2300&#x4E2A;&#x6D4B;&#x8BD5;&#x6848;&#x4F8B;&#x3002;</p>
</blockquote>
<h4 id="%E8%A1%A5%E5%85%85%E8%B5%84%E6%96%99">&#x8865;&#x5145;&#x8D44;&#x6599;</h4>
<p><strong>&#x6587;&#x6863;</strong></p>
<ul>
<li><a href="docs/recipes/reducers/NormalizingStateShape.md">Recipes: Structuring Reducers - state &#x8303;&#x5F0F;&#x5316;</a></li>
</ul>
<p><strong>&#x6587;&#x7AE0;</strong></p>
<ul>
<li><a href="https://www.smashingmagazine.com/2016/09/how-to-scale-react-applications/" target="_blank">How to Scale React Applications </a>(accompanying talk: <a href="https://vimeo.com/168648012" target="_blank">Scaling React Applications</a>)</li>
<li><a href="http://somebody32.github.io/high-performance-redux/" target="_blank">High-Performance Redux</a></li>
<li><a href="http://blog.rangle.io/react-and-redux-performance-with-reselect/" target="_blank">Improving React and Redux Perf with Reselect</a></li>
<li><a href="http://randycoulman.com/blog/2016/09/13/encapsulating-the-redux-state-tree/" target="_blank">Encapsulating the Redux State Tree</a></li>
<li><a href="https://github.com/markerikson/react-redux-links/blob/master/react-performance.md#redux-performance" target="_blank">React/Redux Links: Performance - Redux</a></li>
</ul>
<p><strong>&#x8BA8;&#x8BBA;</strong></p>
<ul>
<li><a href="https://github.com/reactjs/redux/issues/310" target="_blank">#310: Who uses Redux&#xFF1F;</a></li>
<li><a href="https://github.com/reactjs/redux/issues/1751" target="_blank">#1751: Performance issues with large collections</a></li>
<li><a href="https://github.com/reactjs/react-redux/issues/269" target="_blank">React Redux #269: Connect could be used with a custom subscribe method</a></li>
<li><a href="https://github.com/reactjs/react-redux/issues/407" target="_blank">React Redux #407: Rewrite connect to offer an advanced API</a></li>
<li><a href="https://github.com/reactjs/react-redux/issues/416" target="_blank">React Redux #416: Rewrite connect for better performance and extensibility</a></li>
<li><a href="https://github.com/mweststrate/redux-todomvc/pull/1" target="_blank">Redux vs MobX TodoMVC Benchmark: #1</a></li>
<li><a href="https://www.reddit.com/r/reactjs/comments/47m9h5/whats_the_best_place_to_keep_the_initial_state/" target="_blank">Reddit: What&apos;s the best place to keep the initial state&#xFF1F;</a></li>
<li><a href="https://www.reddit.com/r/reactjs/comments/48k852/help_designing_redux_state_for_a_single_page/" target="_blank">Reddit: Help designing Redux state for a single page app</a></li>
<li><a href="https://www.reddit.com/r/reactjs/comments/41wdqn/redux_performance_issues_with_a_large_state_object/" target="_blank">Reddit: Redux performance issues with a large state object&#xFF1F;</a></li>
<li><a href="https://www.reddit.com/r/javascript/comments/49box8/reactredux_for_ultra_large_scale_apps/" target="_blank">Reddit: React/Redux for Ultra Large Scale apps</a></li>
<li><a href="https://twitter.com/NickPresta/status/684058236828266496" target="_blank">Twitter: Redux scaling</a></li>
<li><a href="https://twitter.com/dan_abramov/status/720219615041859584" target="_blank">Twitter: Redux vs MobX benchmark graph - Redux state shape matters</a></li>
<li><a href="http://stackoverflow.com/questions/37264415/how-to-optimize-small-updates-to-props-of-nested-component-in-react-redux" target="_blank">Stack Overflow: How to optimize small updates to props of nested components?</a></li>
<li><a href="https://gist.github.com/markerikson/53735e4eb151bc228d6685eab00f5f85" target="_blank">Chat log: React/Redux perf - updating a 10K-item Todo list</a></li>
<li><a href="https://gist.github.com/markerikson/6056565dd65d1232784bf42b65f8b2ad" target="_blank">Chat log: React/Redux perf - single connection vs many connections</a></li>
</ul>
<p><a id="performance-all-reducers"></a></p>
<h3 id="%E6%AF%8F%E4%B8%AA-action-%E9%83%BD%E8%B0%83%E7%94%A8-%E2%80%9C%E6%89%80%E6%9C%89%E7%9A%84-reducer%E2%80%9D-%E4%BC%9A%E4%B8%8D%E4%BC%9A%E5%BE%88%E6%85%A2%EF%BC%9F">&#x6BCF;&#x4E2A; action &#x90FD;&#x8C03;&#x7528; &#x201C;&#x6240;&#x6709;&#x7684; reducer&#x201D; &#x4F1A;&#x4E0D;&#x4F1A;&#x5F88;&#x6162;&#xFF1F;</h3>
<p>&#x6211;&#x4EEC;&#x5E94;&#x5F53;&#x6E05;&#x695A;&#x7684;&#x8BA4;&#x8BC6;&#x5230; Redux store &#x53EA;&#x6709;&#x4E00;&#x4E2A; reducer &#x65B9;&#x6CD5;&#x3002; store &#x5C06;&#x5F53;&#x524D;&#x7684; state &#x548C;&#x5206;&#x53D1;&#x7684; action &#x4F20;&#x9012;&#x7ED9;&#x8FD9;&#x4E2A; reducer &#x65B9;&#x6CD5;&#xFF0C;&#x5269;&#x4E0B;&#x7684;&#x5C31;&#x8BA9; reducer &#x53BB;&#x5904;&#x7406;&#x3002;</p>
<p>&#x663E;&#x7136;&#xFF0C;&#x5728;&#x5355;&#x72EC;&#x7684;&#x65B9;&#x6CD5;&#x91CC;&#x5904;&#x7406;&#x6240;&#x6709;&#x7684; action &#x4EC5;&#x4ECE;&#x65B9;&#x6CD5;&#x5927;&#x5C0F;&#x53CA;&#x53EF;&#x8BFB;&#x6027;&#x65B9;&#x9762;&#x8003;&#x8651;&#xFF0C;&#x5C31;&#x5DF2;&#x7ECF;&#x5F88;&#x4E0D;&#x5229;&#x4E8E;&#x6269;&#x5C55;&#x4E86;&#xFF0C;&#x6240;&#x4EE5;&#x5C06;&#x5B9E;&#x9645;&#x5DE5;&#x4F5C;&#x5206;&#x5272;&#x6210;&#x72EC;&#x7ACB;&#x7684;&#x65B9;&#x6CD5;&#x5E76;&#x5728;&#x9876;&#x5C42;&#x7684; reducer &#x4E2D;&#x8C03;&#x7528;&#x5C31;&#x53D8;&#x5F97;&#x5F88;&#x6709;&#x610F;&#x4E49;&#x3002;&#x5C24;&#x5176;&#x662F;&#x76EE;&#x524D;&#x7684;&#x5EFA;&#x8BAE;&#x6A21;&#x5F0F;&#x4E2D;&#x63A8;&#x8350;&#x8BA9;&#x5355;&#x72EC;&#x7684;&#x5B50; reducer &#x53EA;&#x8D1F;&#x8D23;&#x66F4;&#x65B0;&#x7279;&#x5B9A;&#x7684; state &#x90E8;&#x5206;&#x3002; <code><span class="token function">combineReducers</span><span class="token punctuation">(</span><span class="token punctuation">)</span></code> &#x548C; Redux &#x642D;&#x914D;&#x7684;&#x65B9;&#x6848;&#x53EA;&#x662F;&#x8BB8;&#x591A;&#x5B9E;&#x73B0;&#x65B9;&#x5F0F;&#x4E2D;&#x7684;&#x4E00;&#x79CD;&#x3002;&#x5F3A;&#x70C8;&#x5EFA;&#x8BAE;&#x5C3D;&#x53EF;&#x80FD;&#x4FDD;&#x6301; store &#x4E2D; state &#x7684;&#x6241;&#x5E73;&#x5316;&#x548C;&#x8303;&#x5F0F;&#x5316;&#xFF0C;&#x81F3;&#x5C11;&#x4F60;&#x53EF;&#x4EE5;&#x968F;&#x5FC3;&#x6240;&#x6B32;&#x7684;&#x7EC4;&#x7EC7;&#x4F60;&#x7684; reducer &#x903B;&#x8F91;&#x3002;</p>
<p>&#x5373;&#x4F7F;&#x4F60;&#x5728;&#x4E0D;&#x7ECF;&#x610F;&#x95F4;&#x5DF2;&#x7ECF;&#x7EF4;&#x62A4;&#x4E86;&#x8BB8;&#x591A;&#x72EC;&#x7ACB;&#x7684;&#x5B50; reducer&#xFF0C;&#x751A;&#x81F3; state &#x4E5F;&#x662F;&#x6DF1;&#x5EA6;&#x5D4C;&#x5957;&#xFF0C;reducer &#x7684;&#x901F;&#x5EA6;&#x4E5F;&#x5E76;&#x4E0D;&#x6784;&#x6210;&#x4EFB;&#x4F55;&#x95EE;&#x9898;&#x3002;JavaScript &#x5F15;&#x64CE;&#x6709;&#x8DB3;&#x591F;&#x7684;&#x80FD;&#x529B;&#x5728;&#x6BCF;&#x79D2;&#x8FD0;&#x884C;&#x5927;&#x91CF;&#x7684;&#x51FD;&#x6570;&#x8C03;&#x7528;&#xFF0C;&#x800C;&#x4E14;&#x5927;&#x90E8;&#x95E8;&#x7684;&#x5B50; reducer &#x53EA;&#x662F;&#x4F7F;&#x7528; <code><span class="token keyword">switch</span></code> &#x8BED;&#x53E5;&#xFF0C;&#x5E76;&#x4E14;&#x9488;&#x5BF9;&#x5927;&#x90E8;&#x5206; action &#x8FD4;&#x56DE;&#x7684;&#x90FD;&#x662F;&#x9ED8;&#x8BA4;&#x7684; state&#x3002;</p>
<p>&#x5982;&#x679C;&#x4F60;&#x4ECD;&#x7136;&#x5173;&#x5FC3; reducer &#x7684;&#x6027;&#x80FD;&#xFF0C;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x7C7B;&#x4F3C; <a href="https://github.com/omnidan/redux-ignore" target="_blank">redux-ignore</a> &#x548C; <a href="https://github.com/chrisdavies/reduxr-scoped-reducer" target="_blank">reduxr-scoped-reducer</a> &#x7684;&#x5DE5;&#x5177;&#xFF0C;&#x786E;&#x4FDD;&#x53EA;&#x6709;&#x67D0;&#x51E0;&#x4E2A; reducer &#x54CD;&#x5E94;&#x7279;&#x5B9A;&#x7684; action&#x3002;&#x4F60;&#x8FD8;&#x53EF;&#x4EE5;&#x4F7F;&#x7528; <a href="https://github.com/michaelcontento/redux-log-slow-reducers" target="_blank">redux-log-slow-reducers</a> &#x8FDB;&#x884C;&#x6027;&#x80FD;&#x6D4B;&#x8BD5;&#x3002;</p>
<h4 id="%E8%A1%A5%E5%85%85%E8%B5%84%E6%96%99">&#x8865;&#x5145;&#x8D44;&#x6599;</h4>
<p><strong>&#x8BA8;&#x8BBA;</strong></p>
<ul>
<li><a href="https://github.com/reactjs/redux/issues/912" target="_blank">#912: Proposal: action filter utility</a></li>
<li><a href="https://github.com/reactjs/redux/issues/1303" target="_blank">#1303: Redux Performance with Large Store and frequent updates</a></li>
<li><a href="http://stackoverflow.com/questions/35667775/state-in-redux-react-app-has-a-property-with-the-name-of-the-reducer/35674297" target="_blank">Stack Overflow: State in Redux app has the name of the reducer</a></li>
<li><a href="http://stackoverflow.com/questions/34494866/how-does-redux-deals-with-deeply-nested-models/34495397" target="_blank">Stack Overflow: How does Redux deal with deeply nested models&#xFF1F;</a></li>
</ul>
<p><a id="performance-clone-state"></a></p>
<h3 id="%E5%9C%A8-reducer-%E4%B8%AD%E5%BF%85%E9%A1%BB%E5%AF%B9-state-%E8%BF%9B%E8%A1%8C%E6%B7%B1%E6%8B%B7%E8%B4%9D%E5%90%97%EF%BC%9F%E6%8B%B7%E8%B4%9D-state-%E4%B8%8D%E4%BC%9A%E5%BE%88%E6%85%A2%E5%90%97%EF%BC%9F">&#x5728; reducer &#x4E2D;&#x5FC5;&#x987B;&#x5BF9; state &#x8FDB;&#x884C;&#x6DF1;&#x62F7;&#x8D1D;&#x5417;&#xFF1F;&#x62F7;&#x8D1D; state &#x4E0D;&#x4F1A;&#x5F88;&#x6162;&#x5417;&#xFF1F;</h3>
<p>&#x4EE5;&#x4E0D;&#x53EF;&#x53D8;&#x7684;&#x65B9;&#x5F0F;&#x66F4;&#x65B0; state &#x610F;&#x5473;&#x7740;&#x6D45;&#x62F7;&#x8D1D;&#xFF0C;&#x800C;&#x975E;&#x6DF1;&#x62F7;&#x8D1D;&#x3002;&#x76F8;&#x6BD4;&#x4E8E;&#x6DF1;&#x62F7;&#x8D1D;&#xFF0C;&#x6D45;&#x62F7;&#x8D1D;&#x66F4;&#x5FEB;&#xFF0C;&#x56E0;&#x4E3A;&#x53EA;&#x9700;&#x590D;&#x5236;&#x5F88;&#x5C11;&#x7684;&#x5B57;&#x6BB5;&#x548C;&#x5BF9;&#x8C61;&#xFF0C;&#x5B9E;&#x9645;&#x7684;&#x5E95;&#x5C42;&#x5B9E;&#x73B0;&#x4E2D;&#x4E5F;&#x53EA;&#x662F;&#x79FB;&#x52A8;&#x4E86;&#x82E5;&#x5E72;&#x6307;&#x9488;&#x800C;&#x5DF2;&#x3002;</p>
<p>&#x56E0;&#x6B64;&#xFF0C;&#x4F60;&#x9700;&#x8981;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x526F;&#x672C;&#xFF0C;&#x5E76;&#x4E14;&#x66F4;&#x65B0;&#x53D7;&#x5F71;&#x54CD;&#x7684;&#x5404;&#x4E2A;&#x5D4C;&#x5957;&#x7684;&#x5BF9;&#x8C61;&#x5C42;&#x7EA7;&#x5373;&#x53EF;&#x3002;&#x5C3D;&#x7BA1;&#x4E0A;&#x8FF0;&#x52A8;&#x4F5C;&#x4EE3;&#x4EF7;&#x4E0D;&#x4F1A;&#x5F88;&#x5927;&#xFF0C;&#x4F46;&#x8FD9;&#x4E5F;&#x662F;&#x4E3A;&#x4EC0;&#x4E48;&#x9700;&#x8981;&#x7EF4;&#x62A4;&#x8303;&#x5F0F;&#x5316;&#x53CA;&#x6241;&#x5E73;&#x5316; state &#x7684;&#x53C8;&#x4E00;&#x5145;&#x5206;&#x7406;&#x7531;&#x3002;</p>
<blockquote>
<p>Redux &#x5E38;&#x89C1;&#x7684;&#x8BEF;&#x89E3;&#xFF1A; &#x9700;&#x8981;&#x6DF1;&#x62F7;&#x8D1D; state&#x3002;&#x5B9E;&#x9645;&#x60C5;&#x51B5;&#x662F;&#xFF1A;&#x5982;&#x679C;&#x5185;&#x90E8;&#x7684;&#x67D0;&#x4E9B;&#x6570;&#x636E;&#x6CA1;&#x6709;&#x6539;&#x53D8;&#xFF0C;&#x7EE7;&#x7EED;&#x4FDD;&#x6301;&#x7EDF;&#x4E00;&#x5F15;&#x7528;&#x5373;&#x53EF;&#x3002;</p>
</blockquote>
<h4 id="%E8%A1%A5%E5%85%85%E8%B5%84%E6%96%99">&#x8865;&#x5145;&#x8D44;&#x6599;</h4>
<p><strong>&#x6587;&#x6863;</strong></p>
<ul>
<li><a href="docs/faq/docs/recipes/reducers/PrerequisiteConcepts.md">Recipes: Structuring Reducers - Prerequisite Concepts</a></li>
<li><a href="docs/recipes/reducers/ImmutableUpdatePatterns.md">Recipes: Structuring Reducers - Immutable Update Patterns</a></li>
</ul>
<p><strong>&#x8BA8;&#x8BBA;</strong></p>
<ul>
<li><a href="https://github.com/reactjs/redux/issues/454" target="_blank">#454: Handling big states in reducer</a></li>
<li><a href="https://github.com/reactjs/redux/issues/758" target="_blank">#758: Why can&apos;t state be mutated&#xFF1F;</a></li>
<li><a href="https://github.com/reactjs/redux/issues/994" target="_blank">#994: How to cut the boilerplate when updating nested entities&#xFF1F;</a></li>
<li><a href="https://twitter.com/dan_abramov/status/688087202312491008" target="_blank">Twitter: common misconception - deep cloning</a></li>
<li><a href="http://www.zsoltnagy.eu/cloning-objects-in-javascript/" target="_blank">Cloning Objects in JavaScript</a></li>
</ul>
<p><a id="performance-update-events"></a></p>
<h3 id="%E6%80%8E%E6%A0%B7%E5%87%8F%E5%B0%91-store-%E6%9B%B4%E6%96%B0%E4%BA%8B%E4%BB%B6%E7%9A%84%E6%95%B0%E9%87%8F%EF%BC%9F">&#x600E;&#x6837;&#x51CF;&#x5C11; store &#x66F4;&#x65B0;&#x4E8B;&#x4EF6;&#x7684;&#x6570;&#x91CF;&#xFF1F;</h3>
<p>Redux &#x5728; action &#x5206;&#x53D1;&#x6210;&#x529F;&#xFF08;&#x4F8B;&#x5982;&#xFF0C;action &#x5230;&#x8FBE; store &#x88AB; reducer &#x5904;&#x7406;&#xFF09;&#x540E;&#x901A;&#x77E5;&#x8BA2;&#x9605;&#x8005;&#x3002;&#x5728;&#x6709;&#x4E9B;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;&#x51CF;&#x5C11;&#x8BA2;&#x9605;&#x8005;&#x88AB;&#x8C03;&#x7528;&#x7684;&#x6B21;&#x6570;&#x4F1A;&#x5F88;&#x6709;&#x7528;&#xFF0C;&#x7279;&#x522B;&#x5728;&#x5F53; action &#x521B;&#x5EFA;&#x51FD;&#x6570;&#x5206;&#x53D1;&#x4E86;&#x4E00;&#x7CFB;&#x5217;&#x4E0D;&#x540C;&#x7684; action &#x65F6;&#x3002;</p>
<p>&#x5982;&#x679C;&#x4F60;&#x5728;&#x4F7F;&#x7528; React&#xFF0C;&#x4F60;&#x53EF;&#x4EE5;&#x5199;&#x5728; <code>ReactDOM<span class="token punctuation">.</span><span class="token function">unstable_batchedUpdates</span><span class="token punctuation">(</span><span class="token punctuation">)</span></code> &#x4EE5;&#x63D0;&#x9AD8;&#x540C;&#x6B65;&#x5206;&#x53D1;&#x7684;&#x6027;&#x80FD;&#xFF0C;&#x4F46;&#x8FD9;&#x4E2A; API &#x662F;&#x5B9E;&#x9A8C;&#x6027;&#x8D28;&#x7684;&#xFF0C;&#x53EF;&#x80FD;&#x4F1A;&#x5728;&#x4EE5;&#x540E;&#x7684;&#x7248;&#x672C;&#x4E2D;&#x79FB;&#x9664;&#xFF0C;&#x6240;&#x4EE5;&#x4E5F;&#x4E0D;&#x8981;&#x8FC7;&#x5EA6;&#x4F9D;&#x8D56;&#x5B83;&#x3002;&#x53EF;&#x4EE5;&#x770B;&#x770B;&#x4E00;&#x4E9B;&#x7B2C;&#x4E09;&#x65B9;&#x7684;&#x5B9E;&#x73B0; <a href="https://github.com/tappleby/redux-batched-subscribe" target="_blank">redux-batched-subscribe</a>&#xFF08;&#x4E00;&#x4E2A;&#x9AD8;&#x7EA7;&#x7684; reducer&#xFF0C;&#x53EF;&#x4EE5;&#x8BA9;&#x4F60;&#x5355;&#x72EC;&#x5206;&#x53D1;&#x51E0;&#x4E2A; action&#xFF09;&#x3001;<a href="https://github.com/tappleby/redux-batched-subscribe" target="_blank">redux-batched-subscribe</a>&#xFF08;&#x4E00;&#x4E2A; store &#x589E;&#x5F3A;&#x5668;&#xFF0C;&#x53EF;&#x4EE5;&#x5E73;&#x8861;&#x591A;&#x4E2A;&#x5206;&#x53D1;&#x60C5;&#x51B5;&#x4E0B;&#x8BA2;&#x9605;&#x8005;&#x7684;&#x8C03;&#x7528;&#x6B21;&#x6570;&#xFF09;&#x548C; <a href="https://github.com/tshelburne/redux-batched-actions" target="_blank">redux-batched-actions</a>&#xFF08;&#x4E00;&#x4E2A; store &#x589E;&#x5F3A;&#x5668;&#xFF0C;&#x53EF;&#x4EE5;&#x5229;&#x7528;&#x5355;&#x4E2A;&#x8BA2;&#x9605;&#x63D0;&#x9192;&#x7684;&#x65B9;&#x5F0F;&#x5206;&#x53D1;&#x4E00;&#x7CFB;&#x5217;&#x7684; action&#xFF09;&#x3002;</p>
<h4 id="%E8%A1%A5%E5%85%85%E8%B5%84%E6%96%99">&#x8865;&#x5145;&#x8D44;&#x6599;</h4>
<p><strong>&#x8BA8;&#x8BBA;</strong></p>
<ul>
<li><a href="https://github.com/reactjs/redux/issues/125" target="_blank">#125: Strategy for avoiding cascading renders</a></li>
<li><a href="https://github.com/reactjs/redux/issues/542" target="_blank">#542: Idea: batching actions</a></li>
<li><a href="https://github.com/reactjs/redux/issues/911" target="_blank">#911: Batching actions</a></li>
<li><a href="https://github.com/reactjs/redux/issues/1813" target="_blank">#1813: Use a loop to support dispatching arrays</a></li>
<li><a href="https://github.com/reactjs/react-redux/issues/263" target="_blank">React Redux #263: Huge performance issue when dispatching hundreds of actions</a></li>
</ul>
<p><strong>&#x5E93;</strong></p>
<ul>
<li><a href="https://github.com/markerikson/redux-ecosystem-links/blob/master/store.md#store-change-subscriptions" target="_blank">Redux Addons Catalog: Store - Change Subscriptions</a></li>
</ul>
<p><a id="performance-state-memory"></a></p>
<h3 id="%E4%BB%85%E6%9C%89-%E2%80%9C%E4%B8%80%E4%B8%AA-state-%E6%A0%91%E2%80%9D-%E4%BC%9A%E5%BC%95%E5%8F%91%E5%86%85%E5%AD%98%E9%97%AE%E9%A2%98%E5%90%97%EF%BC%9F%E5%88%86%E5%8F%91%E5%A4%9A%E4%B8%AA-action-%E4%BC%9A%E5%8D%A0%E7%94%A8%E5%86%85%E5%AD%98%E7%A9%BA%E9%97%B4%E5%90%97%EF%BC%9F">&#x4EC5;&#x6709; &#x201C;&#x4E00;&#x4E2A; state &#x6811;&#x201D; &#x4F1A;&#x5F15;&#x53D1;&#x5185;&#x5B58;&#x95EE;&#x9898;&#x5417;&#xFF1F;&#x5206;&#x53D1;&#x591A;&#x4E2A; action &#x4F1A;&#x5360;&#x7528;&#x5185;&#x5B58;&#x7A7A;&#x95F4;&#x5417;&#xFF1F;</h3>
<p>&#x9996;&#x5148;&#xFF0C;&#x5728;&#x539F;&#x59CB;&#x5185;&#x5B58;&#x4F7F;&#x7528;&#x65B9;&#x9762;&#xFF0C;Redux &#x548C;&#x5176;&#x5B83;&#x7684; JavaScript &#x5E93;&#x5E76;&#x6CA1;&#x6709;&#x4EC0;&#x4E48;&#x4E0D;&#x540C;&#x3002;&#x552F;&#x4E00;&#x7684;&#x533A;&#x522B;&#x5C31;&#x662F;&#x6240;&#x6709;&#x7684;&#x5BF9;&#x8C61;&#x5F15;&#x7528;&#x90FD;&#x5D4C;&#x5957;&#x5728;&#x540C;&#x4E00;&#x68F5;&#x6811;&#x4E2D;&#xFF0C;&#x800C;&#x4E0D;&#x662F;&#x50CF;&#x7C7B;&#x4F3C;&#x4E8E; Backbone &#x90A3;&#x6837;&#x4FDD;&#x5B58;&#x5728;&#x4E0D;&#x540C;&#x7684;&#x6A21;&#x578B;&#x5B9E;&#x4F8B;&#x4E2D;&#x3002;&#x7B2C;&#x4E8C;&#xFF0C;&#x4E0E;&#x540C;&#x6837;&#x7684; Backbone &#x5E94;&#x7528;&#x76F8;&#x6BD4;&#xFF0C;&#x5178;&#x578B;&#x7684; Redux &#x5E94;&#x7528;&#x53EF;&#x80FD;&#x4F7F;&#x7528; <em>&#x66F4;&#x5C11;</em> &#x7684;&#x5185;&#x5B58;&#xFF0C;&#x56E0;&#x4E3A; Redux &#x63A8;&#x8350;&#x4F7F;&#x7528;&#x666E;&#x901A;&#x7684; JavaScript &#x5BF9;&#x8C61;&#x548C;&#x6570;&#x7EC4;&#xFF0C;&#x800C;&#x4E0D;&#x662F;&#x521B;&#x5EFA;&#x6A21;&#x578B;&#x548C;&#x96C6;&#x5408;&#x5B9E;&#x4F8B;&#x3002;&#x6700;&#x540E;&#xFF0C;Redux &#x4EC5;&#x7EF4;&#x62A4;&#x4E00;&#x68F5; state &#x6811;&#x3002;&#x4E0D;&#x518D;&#x88AB;&#x5F15;&#x7528;&#x7684; state &#x6811;&#x901A;&#x5E38;&#x90FD;&#x4F1A;&#x88AB;&#x5783;&#x573E;&#x56DE;&#x6536;&#x3002;</p>
<p>Redux &#x672C;&#x8EAB;&#x4E0D;&#x5B58;&#x50A8; action &#x7684;&#x5386;&#x53F2;&#x3002;&#x7136;&#x800C;&#xFF0C;Redux DevTools &#x4F1A;&#x8BB0;&#x5F55;&#x8FD9;&#x4E9B; action &#x4EE5;&#x4FBF;&#x652F;&#x6301;&#x91CD;&#x653E;&#xFF0C;&#x800C;&#x4E14;&#x4E5F;&#x4EC5;&#x5728;&#x5F00;&#x53D1;&#x73AF;&#x5883;&#x88AB;&#x5141;&#x8BB8;&#xFF0C;&#x751F;&#x4EA7;&#x73AF;&#x5883;&#x5219;&#x4E0D;&#x4F1A;&#x4F7F;&#x7528;&#x3002;</p>
<h4 id="%E8%A1%A5%E5%85%85%E8%B5%84%E6%96%99">&#x8865;&#x5145;&#x8D44;&#x6599;</h4>
<p><strong>&#x6587;&#x6863;</strong></p>
<ul>
<li><a href="advanced/AsyncActions.md]">Docs: Async Actions</a></li>
</ul>
<p><strong>&#x8BA8;&#x8BBA;</strong></p>
<ul>
<li><a href="http://stackoverflow.com/questions/35627553/is-there-any-way-to-commit-the-state-in-redux-to-free-memory/35634004" target="_blank">Stack Overflow: Is there any way to &quot;commit&quot; the state in Redux to free memory&#xFF1F;</a></li>
<li><a href="https://www.reddit.com/r/reactjs/comments/47m9h5/whats_the_best_place_to_keep_the_initial_state/" target="_blank">Reddit: What&apos;s the best place to keep initial state&#xFF1F;</a></li>
</ul>

                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../../docs/faq/CodeStructure.html" class="navigation navigation-prev " aria-label="Previous page: 代码结构"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../../docs/faq/ReactRedux.html" class="navigation navigation-next " aria-label="Next page: React Redux"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../../gitbook/app.js"></script>

    
    <script src="../../gitbook/plugins/gitbook-plugin-edit-link/plugin.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-ga/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"fontSettings":{"theme":null,"family":"sans","size":2},"edit-link":{"base":"https://github.com/camsong/redux-in-chinese/tree/master","label":"开始纠错"},"ga":{"token":"UA-66122997-1","configuration":"auto"}};
    gitbook.start(config);
});
</script>

        <script>(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','//www.google-analytics.com/analytics.js','ga');ga('create', 'UA-66122997-1', 'auto');ga('send', 'pageview');</script>
    </body>
    
</html>
